package org.yoki.edu.bg.radius.core.raw.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import org.yoki.edu.bg.radius.core.raw.infra.RadAcctRepository;
import com.yunzhitx.cloud.common.model.ddd.InstanceFactory;
import lombok.Data;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * 代码生成器自动生成
 * Date:2018-1-3 13:39:27
 * @author
 */
@Data
@Table(name = "radius_rad_acct")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class RadAcct implements Serializable{

	private static final long serialVersionUID = 1L;

    /** */
    @Column(name = "radacctid")
    private Long radacctid;
    /** */
    @Column(name = "acctsessionid")
	private String acctsessionid;
    /** */
    @Column(name = "acctuniqueid")
	private String acctuniqueid;
    /** */
    @Column(name = "username")
	private String username;
    /** */
    @Column(name = "groupname")
	private String groupname;
    /** */
    @Column(name = "realm")
	private String realm;
    /** */
    @Column(name = "nasipaddress")
	private String nasipaddress;
    /** */
    @Column(name = "nasportid")
	private String nasportid;
    /** */
    @Column(name = "nasporttype")
	private String nasporttype;
    /** */
    @Column(name = "acctstarttime")
	private Date acctstarttime;
    /** */
    @Column(name = "acctupdatetime")
	private Date acctupdatetime;
    /** */
    @Column(name = "acctstoptime")
	private Date acctstoptime;
    /** */
    @Column(name = "acctinterval")
	private Integer acctinterval;
    /** */
    @Column(name = "acctsessiontime")
	private Integer acctsessiontime;
    /** */
    @Column(name = "acctauthentic")
	private String acctauthentic;
    /** */
    @Column(name = "connectinfo_start")
	private String start;
    /** */
    @Column(name = "connectinfo_stop")
	private String stop;
    /** */
    @Column(name = "acctinputoctets")
	private Long acctinputoctets;
    /** */
    @Column(name = "acctoutputoctets")
	private Long acctoutputoctets;
    /** */
    @Column(name = "calledstationid")
	private String calledstationid;
    /** */
    @Column(name = "callingstationid")
	private String callingstationid;
    /** */
    @Column(name = "acctterminatecause")
	private String acctterminatecause;
    /** */
    @Column(name = "servicetype")
	private String servicetype;
    /** */
    @Column(name = "framedprotocol")
	private String framedprotocol;
    /** */
    @Column(name = "framedipaddress")
	private String framedipaddress;

	public RadAcct(){}

    private static RadAcctRepository radAcctRepository;
    public static RadAcctRepository getRadAcctRepository(){
		if(null==radAcctRepository){
			radAcctRepository = InstanceFactory.getInstance(RadAcctRepository.class);
		}
    	return radAcctRepository;
    }

    /**
    * 根据Id，更新RadAcct
    *
    * @param
    * @return
    */
    public void update() {
        getRadAcctRepository().updateByPrimaryKeySelective(this);
    }

    /**
    * 根据主键ID查询RadAcct
    * @param id
    * @return
    */
    /*
    public static RadAcctVO selectDetailById(int id) {
        RadAcctVO vo = getRadAcctRepository().selectDetailById(id);
        return vo;
    }
    */

}